using System;
using System.Collections.Generic;
using System.Data.Linq.Mapping;
using InfoTech.Core.Data.Attributes;
using InfoTech.Core.Data.Dataable;
using InfoTech.Core.Data.Persistence;
using InfoTech.Utilities.Generic;

namespace InfoTech.LanTranh.MucVu.Bussiness
{
	[Serializable]
	[ExtraTable(Name = "USER", Schema="dbo")]
	[Table(Name = "[dbo].[USER]")]
	public partial class USER : ObjPersistence, IDeleteable, IUpdateable, IInsertable, ISelectable, IDeleteablebyId, IUpdateablebyId, ISelectablebyId
	{

		#region Fields

		private System.Guid _userid;

		private System.String _username;

		private System.String _password;

		private System.String _email;

		private System.Boolean? _manageuser;

		#endregion

		#region Properties

		[ExtraColumn(DbType = "uniqueidentifier", Length = 0, TypeName = "System.Guid", Type = typeof(System.Guid), CanBeNull = false)]
		[Column(Name = "UserID", DbType = "uniqueidentifier", IsPrimaryKey = true, CanBeNull = false)]
		public System.Guid USERID
		{
			get
			{
				return _userid;
			}
			set
			{
				OnChanged(this, "USERID");
				_userid = value;
			}
		}

		[ExtraColumn(DbType = "nvarchar", Length = 1000, TypeName = "System.String", Type = typeof(System.String), CanBeNull = true)]
		[Column(Name = "UserName", DbType = "nvarchar(1000)", IsPrimaryKey = false, CanBeNull = true)]
		public System.String USERNAME
		{
			get
			{
				return _username;
			}
			set
			{
				OnChanged(this, "USERNAME");
				_username = value;
			}
		}

		[ExtraColumn(DbType = "nvarchar", Length = 1000, TypeName = "System.String", Type = typeof(System.String), CanBeNull = true)]
		[Column(Name = "Password", DbType = "nvarchar(1000)", IsPrimaryKey = false, CanBeNull = true)]
		public System.String PASSWORD
		{
			get
			{
				return _password;
			}
			set
			{
				OnChanged(this, "PASSWORD");
				_password = value;
			}
		}

		[ExtraColumn(DbType = "nvarchar", Length = 1000, TypeName = "System.String", Type = typeof(System.String), CanBeNull = true)]
		[Column(Name = "Email", DbType = "nvarchar(1000)", IsPrimaryKey = false, CanBeNull = true)]
		public System.String EMAIL
		{
			get
			{
				return _email;
			}
			set
			{
				OnChanged(this, "EMAIL");
				_email = value;
			}
		}

		[ExtraColumn(DbType = "bit", Length = 0, TypeName = "System.Boolean", Type = typeof(System.Boolean), CanBeNull = true)]
		[Column(Name = "ManageUser", DbType = "bit", IsPrimaryKey = false, CanBeNull = true)]
		public System.Boolean? MANAGEUSER
		{
			get
			{
				return _manageuser;
			}
			set
			{
				OnChanged(this, "MANAGEUSER");
				_manageuser = value;
			}
		}

		#endregion

		#region Reflector

		public System.Type Reflector()
		{
			return typeof(USER);
		}
		public object Current
		{
			get { return this; }
		}

		#endregion

	}
}
